<body>
<script>
if (window.testRunner) {
    testRunner.dumpAsText();
    testRunner.waitUntilDone();
}

var asyncFinished = false;
var syncFinished = false;

function finish() {
    if (asyncFinished && syncFinished) 
        testRunner.notifyDone();
}


var asyncxhr = new XMLHttpRequest();
asyncxhr.onreadystatechange = function() {
    if (asyncxhr.readyState != 4)
        return;
    asyncFinished = true;
    finish();
};
asyncxhr.open("GET", "resources/get.txt", true);
asyncxhr.send();

var syncxhr = new XMLHttpRequest();
syncxhr.open("GET", "resources/get.txt", false);
syncxhr.send();
document.body.appendChild(document.createTextNode(syncxhr.responseText));
syncFinished = true;

finish();
</script>
</body>
